Skip to content

chore: remove dead orphaned textures management#6

Merged
chiefcll merged 2 commits into
mainfrom
chore/remove-orphaned-textures
May 9, 2026
Merged

chore: remove dead orphaned textures management#6
chiefcll merged 2 commits into
mainfrom
chore/remove-orphaned-textures

Conversation

@chiefcll
Copy link
Copy Markdown
Contributor

@chiefcll chiefcll commented May 9, 2026

Summary

  • Removes the orphanedTextures set, addToOrphanedTextures(), and removeFromOrphanedTextures() from TextureMemoryManager
  • Removes the removeFromOrphanedTextures() call in CoreTextureManager.loadTexture()
  • ~28 lines of dead code deleted across 2 files

Why

addToOrphanedTextures() is never called anywhere in the codebase, so the orphanedTextures set is always empty. The removeFromOrphanedTextures() call in loadTexture() is a no-op. Memory cleanup already works correctly via loadedTextures iteration in the cleanup() method.

Mirrors lightning-js/renderer@383bce8.

Test plan

  • TypeScript type-check passes (tsc --noEmit)
  • Verify texture cleanup still works (textures freed when off-screen / memory pressure)

🤖 Generated with Claude Code

chiefcll and others added 2 commits May 9, 2026 08:42
The orphanedTextures set, addToOrphanedTextures(), and
removeFromOrphanedTextures() are dead code — addToOrphanedTextures is
never called anywhere, so the set is always empty and the remove call
in CoreTextureManager.loadTexture() is a no-op. Cleanup already works
via loadedTextures iteration. Mirrors lightning-js/renderer@383bce8.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@chiefcll chiefcll merged commit da35324 into main May 9, 2026
0 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant